import request from '@/utils/request'

// 查询案件附件列表
export function getCaseAttachList(query) {
  return request({
    url: '/caw/caseAttach/list',
    method: 'get',
    params: query
  })
}
// 查询案件附件详情
export function getCaseAttachDetail(query) {
  return request({
    url: '/caw/caseAttach',
    method: 'get',
    params: query
  })
}

// 新增案件附件
export function addCawCaseAttach(data) {
  return request({
    url: '/caw/caseAttach',
    method: 'post',
    data: data
  })
}

// 附件上传并保存信息到数据库
export function uploadCaseAndSaveTheFile(data) {
  return request({
    url: '/caw/caseAttach/uploadCaseAndSaveTheFile',
    method: 'post',
    data: data
  })
}

// 修改案件附件
export function updateCawCaseAttach(data) {
  return request({
    url: '/caw/caseAttach',
    method: 'put',
    data: data
  })
}

// 删除案件附件
export function deleteCawCaseAttach(attachId) {
  return request({
    url: '/caw/caseAttach/'+attachId,
    method: 'delete',
  })
}

// 导出案件附件列表
export function exportCawCaseAttach(data) {
  return request({
    url: '/caw/caseAttach/export',
    method: 'post',
    data: data
  })
}


